package com.gitee.hermer.engine.jars.starter.thread.pool.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import com.gitee.hermer.engine.jars.core.domain.EngineConstant;
import com.gitee.hermer.engine.jars.dependent.dsm.IEnginePropertiesAware;
import com.gitee.hermer.engine.jars.dependent.dsm.domain.EngineProperties;

@PropertySource(EngineConstant.ENGINE_CONFIG_PROPERTIES_CLASS_PATH)
@Component
public class ThreadPoolProperties extends EngineProperties{
	
	@Value(EngineConstant.PROPERTIES_KEY_ENGINE_CONFIG_THREAD_POOL_SIZE)
	private int poolSize;
	
	@Value(EngineConstant.PROPERTIES_KEY_ENGINE_CONFIG_THREAD_EXECUTE_TIMEOUT)
	private int timeout;

	public int getPoolSize() {
		return poolSize;
	}

	public void setPoolSize(int poolSize) {
		this.poolSize = poolSize;
	}

	public int getTimeout() {
		return timeout;
	}

	public void setTimeout(int timeout) {
		this.timeout = timeout;
	}

}
